package com.prototype.client.managed.ui;

import com.google.gwt.requestfactory.ui.client.ProxyRenderer;
import com.prototype.client.managed.request.CostSheetProxy;

public class CostSheetProxyRenderer extends ProxyRenderer<CostSheetProxy> {

    private static com.prototype.client.managed.ui.CostSheetProxyRenderer INSTANCE;

    protected CostSheetProxyRenderer() {
        super(new String[] { "costSheetName" });
    }

    public static com.prototype.client.managed.ui.CostSheetProxyRenderer instance() {
        if (INSTANCE == null) {
            INSTANCE = new CostSheetProxyRenderer();
        }
        return INSTANCE;
    }

    public String render(CostSheetProxy object) {
        if (object == null) {
            return "";
        }
        return object.getCostSheetName() + " (" + object.getId() + ")";
    }
}
